"""
Air transitions from 
http://www.pa.uky.edu/~peter/atomic/ 
http://physics.nist.gov/PhysRefData/ASD/lines_form.html
Created on Apr 6, 2010
@author: aamn
"""
# #
# provenance gives the origin of the spectral *index* not the line itself.
# 1986ApJS...62..501K    (Kleinmann & Hall 1986; spectra of late type 2-2.5) 
# 1995AJ....110.2415A    (Ali et al. 1995; med res K spect late type ms)
# 1997ApJS..111..445W    (Wallace & Hinkle 1997; med res normal stars K) 
# 1998ApJ...508..397M    (Meyer et al. 1998; H-Band fund. standards) 
# 2000ApJ...535..325W    (Wallace et al. J band fund. standards)
# 2003AJ....125.1480A    (Aspin 2003; evo N1333)
# 2004ApJS..151..387I    (Ivanov et al. 2004; Medium Res of late type I) 
# 2007ApJ...657..511A    (Allers et al. 2007; Young BD low res near-IR spect)
# CoveyB59inPrep         (Covey et al. 2010
# #

# CoveyB59inPrep data (Table 3; preprint version)
# An "EW" 
#    Line Line Line Cont. 1 Cont. 1 Cont. 2 Cont. 2 
#    Name Center (µ) Width (µ) Center (µ) Width (µ) Center (µ) Width (µ) 
#    Mg 1.50 1.504 0.004 1.498 0.0045 1.5095 0.0045 
#    K 1.52 1.5172 0.004 1.5105 0.004 1.523 0.004 
#    Mg 1.58 1.576 0.004 1.57 0.004 1.58 0.004 
#    Si 1.59 1.59 0.005 1.586 0.003 1.594 0.003 
#    CO 1.62 1.61975 0.0045 1.615 0.003 1.628 0.003 
#    CO 1.66 1.6625 0.004 1.6565 0.003 1.67 0.003 
#    Al 1.67 1.674 0.006 1.659 0.003 1.678 0.002 
#    1.70 dip 1.7075 0.003 1.704 0.003 1.7145 0.003 
#    Mg 1.71 1.7115 0.003 1.704 0.003 1.7145 0.003 
#    Ca 1.98 1.982 0.013 1.9676 0.005 1.99775 0.005 
#    Na 2.21 2.2075 0.007 2.195 0.004 2.217 0.006 
#    Ca 2.26 2.264 0.007 2.258 0.0045 2.27 0.0045 
#    CO 2.3 2.30375 0.0225 2.288 0.007 2.3185 0.004 
#    CO 2.34 2.3455 0.003 2.3425 0.003 2.349 0.003 


indices = {\
#				"CaIIH":{"air":[3968.0, ],
#							"N":[3923.7, 3943.7, 1.],
#							"D":[3943.7, 3953.7, 1.],
#							"type":0,
#							"title":ur"Ca \u0399\u0399 \"K\"",
#							"dictindex":0,
#							"provenance":[""]},
				"CaII85":{"air":[8542.09, ],
								"N":[[8527., 8557., 1.]],
								"D":[[8565., 8585., 1.]],
								"type":0,
								"title":ur"Ca \u0399\u0399 \u03BB8542",
								"dictindex":-1,
								"provenance":["2007AJ....134.2398C", "1995AJ....109.1379A",
														"1991ApJS...77..417K"]},

				"KI7665 ":{"air":[7664.90, 7698.96, ],
							"N":[[7659., 7705., 1.]],
							"D":[[7960.0, 8000.0, 1.]],
							"type":0,
							"title":ur"K \u0399 \u03BB7665,7699",
							"dictindex":-1,
							"provenance":[""]},
#
#				" ":{"air":[0.0,],
#							"N":[, 1.],
#							"D":[, 1.],
#							"type":0,
#							"title":ur"X \u0399\u0399 \u03BB",
#							"dictindex":-1,
#							"provenance":[""]},
	}


def lines(indices):
	lines = {}
	lineskeys = ['air', 'title']
	for foo in indices.keys():
		lines[foo] = dict([(bah, indices[foo][bah]) for bah in lineskeys])
